<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-for="(item,index) in items" :key='id'>
            <h1>{{item.name}}</h1>
            <!-- item.itemse 只是把 item -->
            <!-- {
                id: 1,
                name: "可乐",
                itemse: [
                    { id: 4, text: "冷冻可乐" },
                    { id: 5, text: "香草可乐" },
                ],
            },  取出来 给 第二层用-->
            <div v-for="(item2,index2) in item.itemse" :key='item2.id'>
                <p>
                    {{item2.text}}
                </p>
            </div>
        </div>
    </div>


    <script>

        var app = new Vue({
            el: '#app',
            data: {
                message: 'Hello Vue22222!',
                items: [
                    {
                        id: 1,
                        name: "可乐",
                        itemse: [
                            { id: 4, text: "冷冻可乐" },
                            { id: 5, text: "香草可乐" },
                        ],
                    },

                    {
                        id: 2,
                        name: "雪碧",
                        itemse: [
                            { id: 6, text: "冷冻雪碧" },
                            { id: 7, text: "青柠雪碧" },
                        ],
                    },
                    {
                        id: 3,
                        name: "橙子",
                        itemse: [
                            { id: 8, text: "冷冻橙子" },
                            { id: 9, text: "新鲜橙子" },
                        ],
                    },
                ],
                // 三层遍历的作业   
                items2: [
                    {
                        id: 1,
                        name: "可乐",
                        itemse: [
                            { id: 4, text: "冷冻可乐", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                            { id: 5, text: "香草可乐", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                        ],
                    },

                    {
                        id: 2,
                        name: "雪碧",
                        itemse: [
                            { id: 6, text: "冷冻雪碧", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                            { id: 7, text: "青柠雪碧", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                        ],
                    },
                    {
                        id: 3,
                        name: "橙子",
                        itemse: [
                            { id: 8, text: "冷冻橙子", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                            { id: 9, text: "新鲜橙子", arr3: [{ text: '农夫山泉' }, { text: '农夫山泉' }] },
                        ],
                    },
                ],
            }
        })

        console.log('app', app)

    </script>
</body>

</html>